package cn.chmcyz.bootredis.common;

import lombok.Data;

@Data
public class Result {
    private int code;
    private String msg;
    private Object data;

    public static Result sucess(Object data) {
        Result result = new Result();
        result.setCode(200);
        result.setMsg("成功");
        result.setData(data);
        return result;
    }

    public static Result failed(String message) {
        Result result = new Result();
        result.setCode(200);
        result.setMsg(message);
        return result;
    }
}
